package com.richstonedt.smartcity.xaytsccommonrs.common;

/**
 * <b><code>ResultCode</code></b>
 * <p/>
 * Description
 * <p/>
 * <b>Creation Time:</b> 2021/10/11 0011 14:36.
 *
 * @author huangjiahan
 * @since venus-gateway-be
 */
public enum ResultCode implements IErrorCode {

    SUCCESS(200, "SUCCESS"),
    NOT_FOUND(404,"资源不存在"),
    FAILED(500, "系统繁忙"),
    UNAUTHORIZED(401, "未认证"),
    ILLEGAL_PARAMS(100,"参数不正确"),
    FORBIDDEN(403, "没有相关权限"),
    SENSITIVE_WORD_FILTER(600, "请求存在敏感词！");

    private final Integer code;
    private final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
